#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
sys.path.append('../../src')
import nubox
from nubox.const import xrange
try:
    from jarray import array
    def arr_wrap(data, typecode):
        return array(data, typecode)
except ImportError:
    from array import array
    def arr_wrap(data, typecode):
        return array(typecode, data)

from time import time


# int
int1000 = list(range(1000))
start = time()
for i in xrange(100000):
    #list(int1000)
    arr_wrap(int1000, 'i')
stop = time()
print(stop - start)

nubox.NdArray(int1000, (1000, 1), 'i')
int1000 = list(range(1000))
start = time()
for i in range(100000):
#    nubox.NdArray(int1000, (1000, 1), 'i', store='list')
stop = time()
print(stop - start)
